package three;

import java.util.Scanner;

public class test11090 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        int s = scanner.nextInt();
        int[] s_array = new int[n + 1];
        int[][] f = new int[n + 1][m + 1];
        int[][] f_s = new int[n + 1][m + 1];
        int[][] t = new int[n + 1][m + 1];
        int[][] t_s = new int[n + 1][m + 1];
        int[] a = new int[m + 1];
        for (int i = 1; i <= n; i++) {
            s_array[n - i + 1] = s % 10;
            s = s / 10;
        }
        q(n, m, f, s_array, f_s);
        p(n, m, t, s_array, t_s);
        a = Traceback(n, m, f_s, s_array);
        System.out.println(f[n][m] + " " + t[n][m]);
//        for (int i = 1; i <= n; i++) {
//            for (int j = 1; j <= m; j++) {
//                System.out.print(t_s[i][j] + " ");
//            }
//            System.out.println();
//        }
        for (int i = 1; i <= m; i++) {
            if (m != i)
                System.out.print(a[i] + "*");
            else
                System.out.println(a[i] + "=" + f[n][m]);
        }
        a = Traceback(n, m, t_s, s_array);
        for (int i = 1; i <= m; i++) {
            if (m != i)
                System.out.print(a[i] + "+");
            else
                System.out.print(a[i] + "=" + t[n][m]);
        }
    }

    private static int[] Traceback(int n, int m, int[][] f_s, int[] s_array) {
        int[] a = new int[m + 1];
        int k = n;
        for (int i = m; i > 1; i--) {
            a[i] = w(f_s[k][i] + 1, k, s_array);
            k = f_s[k][i];
        }
        if (m > 1)
            a[1] = w(1, k, s_array);
        else
            a[1] = w(1,n,s_array);
        return a;
    }

    private static void p(int n, int m, int[][] t, int[] s_array, int[][] t_s) {
        int min;
        int sum;
        for (int i = 1; i <= n; i++) {
            t[i][1] = w(1, i, s_array);
        }
        for (int i = 1; i <= n; i++) {
            for (int j = 2; j <= m; j++) {
                min = w(1, n, s_array);
                for (int k = j - 1; k <= i - 1; k++) {
                    sum = t[k][j - 1] + w(k + 1, i, s_array);
                    if (min > sum) {
                        min = sum;
                        t_s[i][j] = k;
                    }
                }
                t[i][j] = min;
            }
        }
    }

    private static void q(int n, int m, int[][] f, int[] s_array, int[][] f_s) {
        int max;
        int sum;
        for (int i = 1; i <= n; i++) {
            f[i][1] = w(1, i, s_array);
//            f_s[i][1] = i;
        }
        for (int i = 1; i <= n; i++) {
            for (int j = 2; j <= m; j++) {
                max = -1;
                for (int k = j - 1; k <= i - 1; k++) {
                    sum = f[k][j - 1] * w(k + 1, i, s_array);
                    if (max < sum) {
                        max = sum;
                        f_s[i][j] = k;
                    }
                }
                f[i][j] = max;
            }
        }
    }

    private static int w(int i, int j, int[] s_array) {
        int k = i;
        int sum = 0;
        while (s_array[k] == 0 && k < j) {
            k++;
        }
        while (k <= j) {
            sum = sum * 10 + s_array[k];
            k++;
        }
        return sum;
    }
}
